package tech.aistar.entity;

import java.io.Serializable;

/**
 * 购物车
 */
public class Cart implements Serializable{
    private Integer id;

    private String username;

    private Integer bookid;

    private String imgUrl;

    private String bookName;

    private String intro;

    private int price;

    private int num;

    private int total;

    public Cart() {
    }

    public Cart(String username,Integer bookid, String imgUrl, String bookName, String intro, int price, int num, int total) {
        this.username = username;
        this.bookid = bookid;
        this.imgUrl = imgUrl;
        this.bookName = bookName;
        this.intro = intro;
        this.price = price;
        this.num = num;
        this.total = total;
    }

    public void setBookid(Integer bookid) {
        this.bookid = bookid;
    }

    public Integer getBookid() {
        return bookid;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }



    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Cart{");
        sb.append("id=").append(id);
        sb.append(", username='").append(username).append('\'');
        sb.append(", imgUrl='").append(imgUrl).append('\'');
        sb.append(", bookName='").append(bookName).append('\'');
        sb.append(", intro='").append(intro).append('\'');
        sb.append(", price=").append(price);
        sb.append(", num=").append(num);
        sb.append(", total=").append(total);
        sb.append('}');
        return sb.toString();
    }
}
